﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace ugrow_silverlight
{
    public partial class Intro : UserControl
    {
        private Brush brush_buy;
        private Brush brush_register;
        private Brush brush_green;
        private Brush brush_search;


        public Intro()
        {
            InitializeComponent();
            brush_buy = l_buy.Foreground;
            brush_register = l_register.Foreground;
            brush_green = l_login.Foreground;
            brush_search = l_search.Foreground;
            l_login.Foreground = new SolidColorBrush(Colors.Black);
            l_buy.Foreground = new SolidColorBrush(Colors.Black);
            l_register.Foreground = brush_green;
            l_search.Foreground = brush_green;
        }

        private void l_buy_MouseEnter(object sender, MouseEventArgs e)
        {
            img_buy.Visibility = System.Windows.Visibility.Visible;
            l_buy.Foreground = brush_buy;
            l_login.Opacity = 0.30;
            l_login.Foreground = new SolidColorBrush(Colors.Black);
            l_search.Foreground = new SolidColorBrush(Colors.Black);
            l_register.Foreground = new SolidColorBrush(Colors.Black);
            l_search.Opacity = 0.30;
            l_register.Opacity = 0.30;
            Cursor = Cursors.Hand;
        }

        private void l_buy_MouseLeave(object sender, MouseEventArgs e)
        {
            img_buy.Visibility = System.Windows.Visibility.Collapsed;
            l_buy.Foreground = new SolidColorBrush(Colors.Black);
            l_register.Foreground = brush_green;
            l_search.Foreground = brush_green;
            l_login.Opacity = 1;
            l_search.Opacity = 1;
            l_register.Opacity = 1;
            Cursor = Cursors.Arrow;
        }

        private void l_register_MouseEnter(object sender, MouseEventArgs e)
        {
            img_register.Visibility = System.Windows.Visibility.Visible;
            l_register.Foreground = brush_register;
            l_buy.Foreground = new SolidColorBrush(Colors.Black);
            l_search.Foreground = new SolidColorBrush(Colors.Black);
            l_login.Foreground = new SolidColorBrush(Colors.Black);
            l_login.Opacity = 0.30;
            l_search.Opacity = 0.30;
            l_buy.Opacity = 0.30;
            Cursor = Cursors.Hand;
        }

        private void l_register_MouseLeave(object sender, MouseEventArgs e)
        {
            img_register.Visibility = System.Windows.Visibility.Collapsed;
            l_register.Foreground = brush_green;
            l_search.Foreground = brush_green;
            l_login.Opacity = 1;
            l_search.Opacity = 1;
            l_buy.Opacity = 1;
            Cursor = Cursors.Arrow;
        }

        private void l_login_MouseEnter(object sender, MouseEventArgs e)
        {
            img_login.Visibility = System.Windows.Visibility.Visible;
            l_login.Foreground = brush_green;
            l_buy.Foreground = new SolidColorBrush(Colors.Black);
            l_search.Foreground = new SolidColorBrush(Colors.Black);
            l_register.Foreground = new SolidColorBrush(Colors.Black);
            l_register.Opacity = 0.3;
            l_search.Opacity = 0.3;
            l_buy.Opacity = 0.3;
            Cursor = Cursors.Hand;
        }

        private void l_login_MouseLeave(object sender, MouseEventArgs e)
        {
            img_login.Visibility = System.Windows.Visibility.Collapsed;
            l_login.Foreground = new SolidColorBrush(Colors.Black);
            l_buy.Foreground = new SolidColorBrush(Colors.Black);
            l_register.Foreground = brush_green;
            l_search.Foreground = brush_green;
            l_register.Opacity = 1;
            l_search.Opacity = 1;
            l_buy.Opacity = 1;
            Cursor = Cursors.Arrow;
        }
              

        private void l_search_MouseEnter(object sender, MouseEventArgs e)
        {
            img_search.Visibility = System.Windows.Visibility.Visible;
            l_search.Foreground = brush_search;
            l_login.Foreground = new SolidColorBrush(Colors.Black);
            l_buy.Foreground = new SolidColorBrush(Colors.Black);
            l_register.Foreground = new SolidColorBrush(Colors.Black);
            l_register.Opacity = 0.3;
            l_login.Opacity = 0.3;
            l_buy.Opacity = 0.3;
            Cursor = Cursors.Hand;
        }

        private void l_search_MouseLeave(object sender, MouseEventArgs e)
        {
            img_search.Visibility = System.Windows.Visibility.Collapsed;
            l_login.Foreground = new SolidColorBrush(Colors.Black);
            l_buy.Foreground = new SolidColorBrush(Colors.Black);
            l_register.Foreground = brush_green;
            l_search.Foreground = brush_green;
            l_register.Opacity = 1;
            l_login.Opacity = 1;
            l_buy.Opacity = 1;
            Cursor = Cursors.Arrow;
        }

        private void l_register_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            buykit1.Visibility = System.Windows.Visibility.Collapsed;
            register_content1.Visibility = System.Windows.Visibility.Visible;
            buykit1.ClearFields();
            register_content1.register_thanks1.Visibility = System.Windows.Visibility.Collapsed;
            login1.Visibility = System.Windows.Visibility.Collapsed;
            login1.ClearFields();
        }

        private void l_buy_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            
            buykit1.Visibility = System.Windows.Visibility.Visible;
            register_content1.Visibility = System.Windows.Visibility.Collapsed;
            login1.Visibility = System.Windows.Visibility.Collapsed;
            login1.ClearFields();
        }

        private void l_login_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            login1.Visibility = System.Windows.Visibility.Visible;
            register_content1.Visibility = System.Windows.Visibility.Collapsed;
            buykit1.Visibility = System.Windows.Visibility.Collapsed;
            register_content1.clearFields();
            buykit1.ClearFields();

        }

        private void l_search_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            register_content1.Visibility = System.Windows.Visibility.Collapsed;
            buykit1.Visibility = System.Windows.Visibility.Collapsed;
            register_content1.clearFields();
            buykit1.ClearFields();
            login1.Visibility = System.Windows.Visibility.Collapsed;
            login1.ClearFields();
        }
    }
}
